<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-roomUser-add" th:object="${roomTypeDTO}">

        <input type="hidden" id="roomId" name="roomId" th:value="${roomId}">

        <div class="form-group">
            <label class="col-sm-3 control-label">登陆名（手机号）：</label>
            <div class="col-sm-8">
                <input id="phone" name="phone" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">昵称：</label>
            <div class="col-sm-8">
                <input id="nickName" name="nickName" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">用户类型：</label>
            <div class="col-sm-8">
                <select name="userType"  class="form-control m-b" id="userType">
                    <option value="2" >机器人</option>
                    <option value="0" >普通用户</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">机器人类型：</label>
            <div class="col-sm-8">
                <select name="robotType" class="form-control m-b" id="robotType">
                    <option value="1" >抢包</option>
                    <option value="2" >发包</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否避雷：</label>
            <div class="col-sm-8">
                <select name="leiType" class="form-control m-b" id="leiType">
                    <option value="0" >不避雷</option>
                    <option value="1" >避雷</option>
                </select>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-3 control-label">房间名称：</label>
            <div class="col-sm-8">
                <input id="name" name="name" disabled th:field="*{name}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">房间类型：</label>
            <div class="col-sm-8">
                <input id="roomType" disabled th:field="*{roomType}" name="roomType" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">单雷红包数量：</label>
            <div class="col-sm-8">
                <input id="oddAmount" disabled th:field="*{oddAmount}" name="oddAmount" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">单雷金额范围最小：</label>
            <div class="col-sm-8">
                <input id="oddMoneyMin" disabled th:field="*{oddMoneyMin}" name="oddMoneyMin" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">单雷金额范围最大：</label>
            <div class="col-sm-8">
                <input id="oddMoneyMax" disabled th:field="*{oddMoneyMax}" name="oddMoneyMax" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">单雷赔率：：</label>
            <div class="col-sm-8">
                <input id="oddOneLei" disabled th:field="*{oddOneLei}" name="oddOneLei" class="form-control" type="text">
            </div>
        </div>

        <div style="text-align: center"  id="line">
            <label  style="text-align: center" >--多雷参数--</label>
        </div>

        <div class="form-group" id="evenAmountId">
            <label class="col-sm-3 control-label">多雷红包数量：</label>
            <div class="col-sm-8">
                <input id="evenAmount" disabled th:field="*{evenAmount}" name="evenAmount" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="evenMoneyMinId">
            <label class="col-sm-3 control-label">多雷金额范围最小：</label>
            <div class="col-sm-8">
                <input id="evenMoneyMin" disabled th:field="*{evenMoneyMin}" name="evenMoneyMin" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="evenMoneyMaxId">
            <label class="col-sm-3 control-label">多雷金额范围最大：</label>
            <div class="col-sm-8">
                <input id="evenMoneyMax" disabled th:field="*{evenMoneyMax}" name="evenMoneyMax" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="oneLeiId">
            <label class="col-sm-3 control-label">单雷赔率：</label>
            <div class="col-sm-8">
                <input id="oneLei" disabled th:field="*{oneLei}" name="oneLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="twoLeiId">
            <label class="col-sm-3 control-label">双雷赔率：</label>
            <div class="col-sm-8">
                <input id="twoLei" disabled th:field="*{twoLei}" name="twoLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="threeLeiId">
            <label class="col-sm-3 control-label">三雷赔率：</label>
            <div class="col-sm-8">
                <input id="threeLei" disabled th:field="*{threeLei}" name="threeLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="fourLeiId">
            <label class="col-sm-3 control-label">四雷赔率：</label>
            <div class="col-sm-8">
                <input id="fourLei" disabled th:field="*{fourLei}" name="fourLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="fiveLeiId">
            <label class="col-sm-3 control-label">五雷赔率：</label>
            <div class="col-sm-8">
                <input id="fiveLei" disabled th:field="*{fiveLei}" name="fiveLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="sixLeiId">
            <label class="col-sm-3 control-label">六雷赔率：</label>
            <div class="col-sm-8">
                <input id="sixLei" disabled th:field="*{sixLei}" name="sixLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="sevenLeiId">
            <label class="col-sm-3 control-label">七雷赔率：</label>
            <div class="col-sm-8">
                <input id="sevenLei" disabled th:field="*{sevenLei}" name="sevenLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="eightLeiId">
            <label class="col-sm-3 control-label">八雷赔率：</label>
            <div class="col-sm-8">
                <input id="eightLei" disabled th:field="*{eightLei}" name="eightLei" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" id="nineLeiId">
            <label class="col-sm-3 control-label">九雷赔率：</label>
            <div class="col-sm-8">
                <input id="nineLei" disabled th:field="*{nineLei}" name="nineLei" class="form-control" type="text">
            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<div th:include="tool/upload/webuploader :: webuploader"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>

<script type="text/javascript">
    window.onload = function () {
        var evenAmount = document.getElementById("evenAmount").value;
        if(evenAmount == ""){
            $("#line").hide();
            $("#evenMoneyMinId").hide();
            $("#evenMoneyMaxId").hide();
            $("#evenAmountId").hide();
            $("#oneLeiId").hide();
            $("#twoLeiId").hide();
            $("#threeLeiId").hide();
            $("#fourLeiId").hide();
            $("#fiveLeiId").hide();
            $("#sixLeiId").hide();
            $("#sevenLeiId").hide();
            $("#eightLeiId").hide();
            $("#nineLeiId").hide();
        }
    }
    
    
    var prefix = ctx + "module/room"
    $("#form-roomUser-add").validate({
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/addRoomRobot", $('#form-roomUser-add').serialize());
        }
    }
</script>
</body>
</html>
